Skip to content

Fix getPower return value - #443

Merged
h2zero merged 1 commit into
h2zero:release/1.4from
0xxon:getPowerReturnValue
Sep 2, 2022
Merged

h2zero merged 1 commit into
h2zero:release/1.4from
0xxon:getPowerReturnValue

Conversation

@0xxon

@0xxon 0xxon commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

Power level -3 returned the wrong value.

Power level -3 returned the wrong value.
@h2zero

h2zero commented Sep 2, 2022

Copy link
Copy Markdown
Owner

Good catch! thanks!

@h2zero
h2zero merged commit 38d7df0 into h2zero:release/1.4 Sep 2, 2022
h2zero pushed a commit that referenced this pull request Nov 3, 2026
… at low handles (#443)

* feat(NimBLEServer): add registerServicesFirst() to place app services at low handles

By default the standard GAP (0x1800) and GATT (0x1801) services register first
and take the low attribute handles (0x0001+), with the application's services
placed after them. Some peripherals must instead expose their own services at
the low handles — e.g. when emulating a device whose central addresses
attributes by hardcoded handle rather than by discovery.

Add an opt-in NimBLEServer::registerServicesFirst(bool) setter (default false,
so existing behavior is unchanged) that defers GAP/GATT registration until after
the application services in resetGATT(), giving the application services the low
handles. The device-name/appearance restore that follows ble_gatts_reset() is
factored into a small lambda so it stays correct in either order.
h2zero pushed a commit that referenced this pull request Nov 3, 2026
… at low handles (#443)

* feat(NimBLEServer): add registerServicesFirst() to place app services at low handles

By default the standard GAP (0x1800) and GATT (0x1801) services register first
and take the low attribute handles (0x0001+), with the application's services
placed after them. Some peripherals must instead expose their own services at
the low handles — e.g. when emulating a device whose central addresses
attributes by hardcoded handle rather than by discovery.

Add an opt-in NimBLEServer::registerServicesFirst(bool) setter (default false,
so existing behavior is unchanged) that defers GAP/GATT registration until after
the application services in resetGATT(), giving the application services the low
handles. The device-name/appearance restore that follows ble_gatts_reset() is
factored into a small lambda so it stays correct in either order.
h2zero pushed a commit that referenced this pull request Nov 4, 2026
… at low handles (#443)

* feat(NimBLEServer): add registerServicesFirst() to place app services at low handles

By default the standard GAP (0x1800) and GATT (0x1801) services register first
and take the low attribute handles (0x0001+), with the application's services
placed after them. Some peripherals must instead expose their own services at
the low handles — e.g. when emulating a device whose central addresses
attributes by hardcoded handle rather than by discovery.

Add an opt-in NimBLEServer::registerServicesFirst(bool) setter (default false,
so existing behavior is unchanged) that defers GAP/GATT registration until after
the application services in resetGATT(), giving the application services the low
handles. The device-name/appearance restore that follows ble_gatts_reset() is
factored into a small lambda so it stays correct in either order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants